//
//  RetWeetView.swift
//  weiboSwift1.0
//
//  Created by xuNick on 16/4/21.
//  Copyright © 2016年 NN. All rights reserved.
//

import UIKit

class RetWeetView: UIView {

    var viewModel:WeiboCellViewModel?{
        didSet{
            
            //设置文字
            
            content?.text = viewModel?.retweet
        }
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.backgroundColor = KsubviewColor
        setupUI()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    
    func setupUI(){
        
        self.addSubview(content!)
        content?.snp_makeConstraints(closure: { (make) -> Void in
            make.top.leading.equalTo(self).offset(CellMagin)
        })
        
        self.snp_makeConstraints { (make) -> Void in
            make.bottom.equalTo((content?.snp_bottom)!)
        }
    }
    
    
    //MARK: - 懒加载控件
    lazy var content:UILabel? = {
       let label = UILabel(textColor: UIColor.darkTextColor(), fontSize: 13, preferredMaxLayoutWidth: KcontentW)
        
        return label
    }()
    
}
